

print("init func")

function createGlobalGo(parent, index, count)
    local list = _G.globalList or {}
    
    for i = 1, count do
        local go = UnityEngine.GameObject("GlobalGo_" .. tostring(index) .. "_" .. i)

        go.transform:SetParent(parent)
        table.insert(list, go)
    end
end

function logGlobalGo()
    local list = _G.globalList
    
    if not list then
        print("bot list")
        return
    end

    print("list count .. " + #list)
    for i = 1, #list do
        local go = list[i]
        print(go.name)
    end
end

function createTempGo(parent, index, count)
    for i = 1, count do
        local go = UnityEngine.GameObject("TempGo_" .. tostring(index) .. "_" .. i)
        go.transform:SetParent(parent)
    end
end

